import { createRouter, createWebHistory } from 'vue-router'


const routes = [
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/',
    name: 'login',
    component: () => import( '../components/Login/login.vue')
  },
  {
    path: '/index',
    name: 'index',
    component: () => import( '../components/Info/index.vue'),
    redirect: '/index',
    children:[
      {
        path: '/indexs',
        name: 'indexs',
        component: () => import( '../components/Info/indexs.vue')
      },
      {
        path: '/main',
        name: 'main',
        component: () => import( '../components/Main/main.vue')
      },
      {
        path: '/classadd',
        name: 'classadd',
        component: () => import( '../components/Classinfo/classadd.vue')
      },
       {
        path: '/StudentManagement',
        name: 'StudentManagement',
        component: () => import( '../components/Student/StudentManagement.vue')
      },
      {
        path: '/ClassManagements',
        name: 'ClassManagements',
        component: () => import( '../components/ClassManagement/ClassManagements.vue')
      },
      {
        path: '/AttendanceManagement',
        name: 'AttendanceManagement',
        component: () => import( '../components/Attendance/AttendanceManagement.vue')
      },
      {
        path: '/curriculum',
        name: 'curriculum',
        component: () => import( '../components/Curriculum/curriculum.vue')
      },
      {
        path: '/classroom',
        name: 'classroom',
        component: () => import( '../components/Classroom/classroom.vue')
      },
      {
        path: '/teacher',
        name: 'teacher',
        component: () => import( '../components/Teacher/teacher.vue')
      },
      {
        path: '/accountNumber',
        name: 'accountNumber',
        component: () => import( '../components/AccountNumber/accountNumber.vue')
      }
    ]
  },
  
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
